{% extends "base.html" %}
{% block title %}Asignar Miembros{% endblock %}
{% block body %}
  <h2>Asignar Miembros</h2>
  {% if error %}<div class=error><strong>Error:</strong> {{ error }}</div>{% endif %}
  <form action="" method=post>
      <table>
          <TR>
              <TD><input type=text name=cadena size=30 value="{{ cadena }}"></TD>
              <TD><select name="campos">
                  <option {% if set_etc == "todos" %} selected="selected" {% endif %} value="todos">Todos</option>
                  <option {% if set_etc == "usuario" %} selected="selected" {% endif %} value="usuario">Usuario</option>
                  <option {% if set_etc == "nombre" %} selected="selected" {% endif %} value="nombre">Nombre</option>
                  <option {% if set_etc == "apellido" %} selected="selected" {% endif %} value="apellido">Apellido</option>
                  <option {% if set_etc == "correo" %} selected="selected" {% endif %} value="correo">Correo</option>
              </TD>
              <TD><input type=submit name="action" value=Buscar></TD>
              <TD><input type=submit name="action" value=Limpiar></TD>
          </TR>
      </table>
      <br>
      <table>
          <TR>
              <TD><input type=submit name="action" value=Asignar></TD>
              <TD><button type=submit name="action" value=Salir>Regresar</button></TD>
          </TR>
      </table>
      <br>
      <table>
          <TR>
              <TD>Seleccionar</TD>
              <TD>Usuario</TD>
              <TD>Nombre</TD>
              <TD>Apellido</TD>
              <TD>Correo</TD>
          </TR>
          {% for item in items %}
          <TR>
            <td><input type=checkbox name=seleccionados value="{{ item.id_usuario }}"></td>
            <TD class="c1">{{item.id_usuario}}</TD>
            <TD class="c2">{{item.nombre}}</TD>
            <TD class="c3">{{item.apellido}}</TD>
            <TD class="c4">{{item.correo}}</TD>
          </TR>
          {% endfor %}
      </table>
    </form>
{% endblock %}
